import request from "@/api/http";
const userapi = "/FeichengWeb/api/user";
const apijob = "/ShixiWeb/api/job";

export function loginByPhoneAndVerifyCode(params) {
  return request({
    url: `${userapi}/loginByPhoneAndVerifyCode`,
    method: "post",
    params: params,
  });
}

export function loginByPhone(token) {
  return request({
    url: `${userapi}/loginByPhone`,
    method: "post",
    params: { token },
  });
}

export function getAllDutyList(params) {
  // return params
  // https://www.liufengtec.com/ShixiWeb/api/job/getAllDutyList
  // ?userid=2&token=93679873f670476d90cf7005a6498838
  return request({
    url: `${apijob}/getAllDutyList`,
    method: "post",
    params: { params },
  });
}

// export function removeToken() {
//   console.log('user-removeToken')
//   window.sessionStorage.clear()
//   return localStorage.removeItem('userInfo')
// }

// 路由跳转

//
// export function logout() {
//   return request({
//     url: '/vue-admin-template/user/logout',
//     method: 'post'
//   })
// }

// export default {
//
// }
